import { defineStore } from "pinia"
import { ref } from "vue"
import { getBlogSettingDetail } from "@/api/frontend/blogsettings"

export const useBlogSettingsStore = defineStore('blogsettings', () => {
    const blogSettings = ref({})

    function getBlogSettings() {
        console.log('获取博客设置信息')
        getBlogSettingDetail().then(res => {
            if(res.success) {
                blogSettings.value = res.data
            }
        })
    }

    return { blogSettings, getBlogSettings }
})